import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout.vue'
import Index from '@/views/MyIndex/index.vue'
import City from '@/views/city.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/index',
    children: [{ path: 'index', component: Index }]
  },
  { path: '/city', component: City }
]

const router = new VueRouter({
  routes
})

export default router
